package com.sleet.yuemiao.controller;

import com.sleet.yuemiao.comment.ControllerInfo;
import com.sleet.yuemiao.comment.ControllerMapping;
import com.sleet.yuemiao.pojo.PageHotCardDto;
import com.sleet.yuemiao.service.impl.MainService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.Map;

/**
 * @program: yuemiao
 * @ClassName MainController
 * @description:
 * @author: Liyongxing
 * @create: 2021-11-23 18:58
 **/
@RestController
@ControllerInfo
public class MainController {
    @Resource
    MainService mainService;

    @GetMapping("/init")
    public Object init(){
        return mainService.yuemiao();
    }



    @ControllerMapping(scene = "rmktjy",mapping = "save")
    @PostMapping("/save")
    public Object testMappost(@RequestBody @Valid PageHotCardDto testDto){
        Map<String,Object> map = new HashMap();
        return null;
    }
    @ControllerMapping(scene = "rmktjy",mapping = "update")
    @PostMapping("/update")
    public Object update(@RequestBody @Valid PageHotCardDto testDto){
        return testDto;
    }
}
